<!-- 添加、编辑党组织 -->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>党员添加页面</title>
    <link rel="stylesheet" href="../../yl/index.css" />
    <!-- 布局样式 -->
    <link rel="stylesheet" href="../../yl/style.css" />
    <link rel="stylesheet" href="../../yl/mobile.css" />
    <link rel="stylesheet" href="../../yl/easyui.css" />
    <link rel="stylesheet" href="../../yl/icon.css" />
    <style>
        .el-descriptions__label{
    width: 200px;
}
    </style>
</head>

<body>
    <div class="easyui-navpanel" id="app" v-cloak>
        <header>
            <div class="m-toolbar">
                <div class="m-title">党员档案</div>
            </div>
        </header>
        <div class="easyui-navpanel panel-body panel-body-nobottom panel-body-noborder" style="height: 3000px"
            id="MainTable" ref="MainTable"
            :data-options="JSON.stringify({ 'TableName': 'party_member_information', 'form': 'dataForm','primary_key': 'Party_Member_SerialNumber' })">
            <div class="yl-main">
                <div class="table_titel">
                    <div class="titel">党员信息</div>
                </div>
                <el-form :model="dataForm" :rules="rules" ref="formRef" :inline-message="true">
                    <el-descriptions :column="1" size="large" border>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">党员头像</div>
                            </template>
                            <el-form-item>
                                <el-image :src="photo + dataForm.Picture_URL" fit="contain"
                                    style="width: 148px; height: 148px;border-radius: 5px; border: 1px solid  #ebeef5;"></el-image>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">党员身份证</div>
                            </template>
                            <el-form-item prop="ID_Card_Number">
                                <el-input disabled @change="shibie" v-model="dataForm.ID_Card_Number"
                                    class="borderless-input" placeholder="请输入党员身份证" />
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">党员姓名</div>
                            </template>
                            <el-form-item prop="Personal_Name">
                                <el-input disabled v-model="dataForm1.Personal_Name" class="borderless-input"
                                    placeholder="请输入党员姓名" />
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">性别</div>
                            </template>
                            <el-select disabled v-model="dataForm1.Gender" placeholder="请选择性别" size="large">
                                <el-option v-for="item in ['男','女']" :key="item" :label="item" :value="item" />
                            </el-select>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">出生日期</div>
                            </template>
                            <el-date-picker disabled v-model="dataForm1.Birthday" format="YYYY-MM-DD"
                                value-format="YYYY-MM-DD" class="borderless-input" type="date" placeholder="请选择出生日期"
                                size="large" />
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">户籍地(省/市/区)</div>
                            </template>
                            <el-cascader disabled @change="changeCity" v-model="dataForm1.RR_County_Nubmer" filterable
                                class="borderless-input"
                                :props="{value:'value',label:'label',children:'children',emitPath:false}"
                                placeholder="请选择省市区乡镇" :options="city" style="width: 100%"></el-cascader>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">户籍地(乡镇/村庄)</div>
                            </template>
                            <el-cascader disabled @change="changeCity1" v-model="dataForm1.RR_Village_Number" filterable
                                class="borderless-input"
                                :props="{value:'ProvinceNumber',label:'Province',children:'children',emitPath:false}"
                                placeholder="请选择省市区乡镇" :options="city1" style="width: 100%"></el-cascader>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">家庭地址</div>
                            </template>
                            <el-input disabled v-model="dataForm1.Home_Address" class="borderless-input"
                                placeholder="请输入家庭地址" />
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">民族</div>
                            </template>
                            <el-select disabled v-model="dataForm1.Nation" placeholder="请选择民族" size="large">
                                <el-option v-for="item in Nation" :key="item.id" :label="item.name"
                                    :value="item.name" />
                            </el-select>
                        </el-descriptions-item>
                        <!-- <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">党内职务</div>
                            </template>
                            <el-form-item prop="Position">
                                <el-select disabled v-model="dataForm.Position" placeholder="请选择党内职务" size="large">
                                    <el-option v-for="item in Affiliation" :key="item.value" :label="item.label"
                                        :value="item.value" />
                                </el-select>
                            </el-form-item>
                        </el-descriptions-item> -->
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">认领岗位</div>
                            </template>
                            <el-form-item prop="Party_Member_Position_SerialNumber">
                                <el-select disabled v-model="dataForm.Party_Member_Position_SerialNumber"
                                    placeholder="请选择认领岗位" size="large">
                                    <el-option v-for="item in Position" :key="item.value"
                                        :label="item.Party_Member_Position"
                                        :value="item.Party_Member_Position_SerialNumber" />
                                </el-select>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">入党日期</div>
                            </template>
                            <el-form-item prop="Joining_Date">
                                <el-date-picker disabled v-model="dataForm.Joining_Date" format="YYYY-MM-DD"
                                    value-format="YYYY-MM-DD" class="borderless-input" type="date" placeholder="请选择入党日期"
                                    size="large" />
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">转正日期</div>
                            </template>
                            <el-form-item prop="Conformation_Date">
                                <el-date-picker disabled v-model="dataForm.Conformation_Date" format="YYYY-MM-DD"
                                    value-format="YYYY-MM-DD" class="borderless-input" type="date" placeholder="请选择转正日期"
                                    size="large" />
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">所属党组织</div>
                            </template>
                            <el-form-item prop="Party_Organization_SerialNumber">
                                <el-cascader disabled v-model="dataForm.Party_Organization_SerialNumber" filterable
                                    class="borderless-input"
                                    :props="{value:'Party_Organization_SerialNumber',label:'Party_Organization_Name',children:'children',checkStrictly: true, emitPath: false}"
                                    placeholder="请选择所属党组织" :options="Manager" style="width: 100%"></el-cascader>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">党员类型</div>
                            </template>
                            <el-form-item prop="Party_Member_Category_SerialNumber">
                                <el-select disabled v-model="dataForm.Party_Member_Category_SerialNumber"
                                    placeholder="请选择所属党员类型" size="large">
                                    <el-option v-for="item in Category" :key="item.Party_Member_Category_SerialNumber"
                                        :label="item.Party_Member_Category"
                                        :value="item.Party_Member_Category_SerialNumber" />
                                </el-select>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">附件</div>
                            </template>
                            <el-form-item>
                                <yl-upload ref="ylUpload" drag :limit="99" :file="fileList"></yl-upload>
                            </el-form-item>
                        </el-descriptions-item>
                        <el-descriptions-item>
                            <template #label>
                                <div class="cell-item">附件</div>
                            </template>
                            <el-form-item>
                                <el-table id="table" border max-height="450" tooltip-effect="dark" :data="childDataForm1">
                                    <el-table-column min-width="180" prop="Attachment_SerialNumber"
                                        label="附件流水号"></el-table-column>
                                    <el-table-column min-width="180" prop="File_NameOri" label="附件名称">
                                        <template v-slot="{row}">
                                            {{row.File_NameOri || row.File_Name}}
                                        </template>
                                    </el-table-column>
                                    <el-table-column min-width="180" prop="File_Name" label="磁盘文件名"></el-table-column>
                                    <el-table-column width="200" fixed="right" align="center" label="操作">
                                        <template v-slot="{row}">
                                            <el-button type="primary" size="small" @click="preview(row)">
                                                在线预览
                                            </el-button>
                                            <el-button type="success" size="small" @click="download(row)">
                                                下载附件
                                            </el-button>
                                        </template>
                                    </el-table-column>
                                </el-table>
                            </el-form-item>
                        </el-descriptions-item>
                    </el-descriptions>
                </el-form>
                <div id="ChildTable">
                    <div class="table_titel">
                        <div class="titel">成长轨迹{{childDataForm.filter(item => item.Row_Status != '1' && item.Type ==
                            '0').length ==
                            0?'(暂无数据)':''}}
                        </div>
                    </div>
                    <el-descriptions
              :data-options="JSON.stringify({'TableName': 'party_member_attachment', 'form': 'childDataForm1', 'ParentTableName': 'party_member_information'})"
          ></el-descriptions>
                    <el-timeline :reverse="true" class="custom-timeline">
                        <el-timeline-item
                            v-for="(item, index) in childDataForm.filter(i => i.Row_Status != '1' && i.Type == '0')"
                            :key="index">
                            <div
                                style="font-size: 16px;margin-bottom: 5px; display: flex; justify-content: space-between;  width: 500px;">
                                <span>{{item.Start_Date}} ~ {{item.End_Date}}</span>
                                <el-tag v-if="item.Place_File != '1'" type="danger">未归档</el-tag>
                            </div>
                            <div style="font-size: 16px;margin-bottom: 5px;">
                                <span style="font-weight: bold;">地点:</span> {{item.Recording_Location}}
                            </div>
                            <el-card class="box-card" shadow="never" style="width: 500px;">
                                <div>{{item.Event_Main}}</div>
                            </el-card>
                            <div style="font-size: 16px;margin-bottom: 5px;">
                                <span style="font-weight: bold;">附件:</span>
                            </div>
                            <ul class="el-upload-list el-upload-list--text" style="width: 500px;">
                                <li v-for="(obj,id) in item.Children.party_member_event_attachment.filter(i=>i.Row_Status !='1')"
                                    class="el-upload-list__item is-success">
                                    <div class="el-upload-list__item-info">
                                        <a class="el-upload-list__item-name" @click="preview(obj)">
                                            <el-icon>
                                                <Document />
                                            </el-icon>
                                            <span class="el-upload-list__item-file-name">{{obj.Attachment_Name +
                                                "（磁盘文件名:" + obj.Attachment_URL + "）"}}</span>
                                        </a>
                                    </div>
                                    <label class="el-upload-list__item-status-label">
                                        <el-icon class="el-icon--upload-success">
                                            <Download />
                                        </el-icon>
                                    </label>
                                    <el-icon @click="download(obj)"
                                        class="el-icon el-icon--upload-success el-icon--close">
                                        <Download />
                                    </el-icon>
                                </li>
                            </ul>
                        </el-timeline-item>
                    </el-timeline>
                    <div class="table_titel">
                        <div class="titel">奖惩记录{{childDataForm.filter(item => item.Row_Status != '1' && item.Type ==
                            '1').length ==
                            0?'(暂无数据)':''}}
                        </div>
                    </div>
                    <el-timeline :reverse="true" class="custom-timeline">
                        <el-timeline-item
                            v-for="(item, index) in childDataForm.filter(i => i.Row_Status != '1' && i.Type == '1')"
                            :key="index">
                            <div
                                style="font-size: 16px;margin-bottom: 5px;display: flex;justify-content: space-between; width: 500px;">
                                <div>
                                    <span style="font-weight: bold;">时间:</span> {{item.Recording_Date}}
                                </div>
                                <el-tag v-if="item.Place_File != '1'" type="danger">未归档</el-tag>
                            </div>
                            <div style="font-size: 16px;margin-bottom: 5px;">
                                <span style="font-weight: bold;">地点:</span> {{item.Recording_Location}}
                            </div>
                            <el-card class="box-card" shadow="never" style="width: 500px;">
                                <div>{{item.Event_Main}}</div>
                            </el-card>
                            <div style="font-size: 16px;margin-bottom: 5px;">
                                <span style="font-weight: bold;">附件:</span>
                            </div>
                            <ul class="el-upload-list el-upload-list--text" style="width: 500px;">
                                <li v-for="(obj,id) in item.Children.party_member_event_attachment.filter(i=>i.Row_Status !='1')"
                                    class="el-upload-list__item is-success">
                                    <div class="el-upload-list__item-info">
                                        <a class="el-upload-list__item-name" @click="preview(obj)">
                                            <el-icon>
                                                <Document />
                                            </el-icon>
                                            <span class="el-upload-list__item-file-name">{{obj.Attachment_Name +
                                                "（磁盘文件名:" + obj.Attachment_URL + "）"}}</span>
                                        </a>
                                    </div>
                                    <label class="el-upload-list__item-status-label">
                                        <el-icon class="el-icon--upload-success">
                                            <Download />
                                        </el-icon>
                                    </label>
                                    <el-icon @click="download(obj)"
                                        class="el-icon el-icon--upload-success el-icon--close">
                                        <Download />
                                    </el-icon>
                                </li>
                            </ul>
                        </el-timeline-item>
                    </el-timeline>
                    <div class="table_titel">
                        <div class="titel">承诺践诺</div>
                    </div>
                    <el-table id="table" style="margin-bottom: 20px;" border max-height="450" tooltip-effect="dark"
                        :data="childDataForm1">
                        <el-table-column min-width="180" prop="Attachment_SerialNumber" label="附件流水号"></el-table-column>
                        <el-table-column min-width="180" prop="Attachment_Name" label="附件名称"></el-table-column>
                        <el-table-column min-width="180" prop="Attachment_URL" label="磁盘文件名"></el-table-column>
                        <el-table-column width="90" fixed="right" align="center" label="状态">
                            <template v-slot="{row}">
                                <el-tag v-if="row.Place_File != '1'" type="danger">未归档</el-tag>
                            </template>
                        </el-table-column>
                        <el-table-column width="200" fixed="right" align="center" label="操作">
                            <template v-slot="{row}">
                                <el-button type="primary" size="small" @click="preview(row)">
                                    在线预览
                                </el-button>
                                <el-button type="success" size="small" @click="download(row)">
                                    下载附件
                                </el-button>
                            </template>
                        </el-table-column>
                    </el-table>
                    
                </div>
            </div>
        </div>
        <footer class="botton-ann">
            <el-button @click="goBack">返回</el-button>
        </footer>
        <yl-online-preview :file-url="fileUrl" v-model="showDialog"></yl-online-preview>
    </div>
</body>
<script src="../../utils/utils.js"></script>
<script src="../../utils/ID_Validity.js"></script>
<script src="../../config/config.js"></script>
<script src="../../utils/compressor.js"></script>
<script src="../../utils/mixins.js"></script>
<script src="../../yl/vue.js"></script>
<script src="../../yl/index.js"></script>
<script src="../../yl/zh-cn.mjs"></script>
<script src="../../yl/index.iife.min.js"></script>
<script src="../../yl/jquery.min.js"></script>
<script src="../../utils/jquery.cookie.js"></script>
<script src="../../yl/jquery.easyui.min.js"></script>
<script src="../../yl/jquery.easyui.mobile.js"></script>
<script src="../../yl/moment.min.js"></script>
<script src="../../api/request.js"></script>
<script src="./js/show.js"></script>

</html>